#!/usr/bin/env python3
# -*- coding=utf-8 -*-
# 题目：输入一行字符，分别统计出其中英文字母、空格、数字和其它字符的个数。

import curses.ascii as cs


def f1(s="123123asdas  d ***"):
    alpha = 0
    space = 0
    num = 0
    other = 0
    for x in s:
        if cs.isalpha(x):
            alpha += 1
        elif cs.isspace(x):
            space += 1
        elif cs.isalnum(x):
            num += 1
        else:
            other += 1
    print(f"'{s}' alpha: {alpha}")
    print(f"'{s}' space: {space}")
    print(f"'{s}' num: {num}")
    print(f"'{s}' other: {other}")


f = f1
if __name__ == "__main__":
    f()
